package com.kasax.hinetwork;

import java.util.Map;

public class HttpRequest {
    public enum HttpType {
        GET, POST, DELETE, PUT
    }

    public enum BodyType {
        FROM, BODY
    }

    private HttpType type;

    // get
    // 查询参数; 路径参数

    // post
    // url, body-type: form,body

    private Map<String, Object> headers;

    // get
    private String serverUrl;
    private Map<String, Object> queryParemeters;
    private Map<String, Object> pathParamters;


    // post
    private Map<String, Object> body;

    public HttpRequest() {
    }

    public HttpType getType() {
        return type;
    }

    public void setType(HttpType type) {
        this.type = type;
    }

    public Map<String, Object> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, Object> headers) {
        this.headers = headers;
    }

    public String getServerUrl() {
        return serverUrl;
    }

    public void setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
    }

    public Map<String, Object> getQueryParemeters() {
        return queryParemeters;
    }

    public void setQueryParemeters(Map<String, Object> queryParemeters) {
        this.queryParemeters = queryParemeters;
    }

    public Map<String, Object> getPathParamters() {
        return pathParamters;
    }

    public void setPathParamters(Map<String, Object> pathParamters) {
        this.pathParamters = pathParamters;
    }

    public Map<String, Object> getBody() {
        return body;
    }

    public void setBody(Map<String, Object> body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return "HttpRequest{" +
                "type=" + type +
                ", headers=" + headers +
                ", serverUrl='" + serverUrl + '\'' +
                ", queryParemeters=" + queryParemeters +
                ", pathParamters=" + pathParamters +
                ", body=" + body +
                '}';
    }
}
